export const formConfig = {
	inline: false,
	showBtn: true,
	labelPosition: 'top',
	labelWidth: '120px',
	column: [
		{
			label: '数据类型',
			prop: 'dataType',
			type: 'select',
			dicData: [
				{ label: '养老服务对象', value: '1' },
				{ label: '养老服务机构', value: '2' },
				{ label: '社区养老服务设施', value: '3' },
				{ label: '养老服务组织', value: '4' },
				{ label: '养老从业人员', value: '5' },
			],
			span: 24,
		},
		{
			label: '审批流的key',
			prop: 'approvalKey',
			type: 'input',
			span: 24,
		},
		{
			label: '行政区划',
			prop: 'administrationId',
			type: 'input',
			span: 24,
		},
	],
}

export const searchConfig = {
	inline: true,
	showBtn: true,
	labelPosition: 'left',
	column: [
		{
			label: '数据类型',
			prop: 'dataType',
			type: 'select',
			dicData: [
				{ label: '养老服务对象', value: '1' },
				{ label: '养老服务机构', value: '2' },
				{ label: '社区养老服务设施', value: '3' },
				{ label: '养老服务组织', value: '4' },
				{ label: '养老从业人员', value: '5' },
			],
			span: 8,
		},
		{
			label: '审批流的key',
			prop: 'approvalKey',
			type: 'input',
			span: 8,
		},
		{
			label: '行政区划',
			prop: 'administrationId',
			type: 'input',
			span: 8,
		},
	],
}

export const tableConfig = {
	stripe: true,
	border: true,
	columns: [
		{ label: '审批流的key', prop: 'approvalKey' },
		{
			label: '数据类型',
			prop: 'dataType',
			custome: 'tag',
			dicData: [
				{ label: '养老服务对象', value: '1' },
				{ label: '养老服务机构', value: '2' },
				{ label: '社区养老服务设施', value: '3' },
				{ label: '养老服务组织', value: '4' },
				{ label: '养老从业人员', value: '5' },
			],
		},
		{ label: '创建时间', prop: 'createTime' },
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}

export const api = {
	index: 'view_approvalFlowConfiguration_page',
	add: 'view_approvalFlowConfiguration_add',
	edit: 'view_approvalFlowConfiguration_edit',
	delete: 'view_approvalFlowConfiguration_del',
}
export const baseConfig = {
	pageName: '审批流配置',
	dictcodes: [],
	rowKey: 'id',
	addLabel: '新增',
	tipLabel: 'approvalKey',
	exportMqTopic: '/ning/export/',
	api,
	auth: {
		...api,
		mulitSet: 'mulitSet',
	},
	menuBtn: [
		{
			icon: 'editor',
			label: '编辑',
			type: 'primary',
			operate: 'edit',
			auth: api.edit,
			text: true,
			show: true,
		},
		{
			icon: 'delete',
			label: '删除',
			type: 'danger',
			operate: 'delete',
			auth: api.delete,
			text: true,
			show: true,
		},
	],
	saveFormate: async (form) => {
		return new Promise((resolve, reject) => {
			resolve(form)
		})
	},
	dialogConfig: {
		width: '45%',
	},
	searchConfig,
	formConfig,
	tableConfig,
}
